Scenario based insights into structure data

ABSTRACT

Querying a finite set of data sources. A method includes receiving a query from a user. The method further includes determining a set of two or more data sources from the finite set of data sources that together can be used to satisfy the query. The method further includes translating at least a portion of the query from the user to semantically appropriate queries for the two or more data sources. The method further includes receiving results from the two or more data sources to the semantically appropriate queries. The method further includes aggregating the results, and presenting the aggregation to the user.

BACKGROUND Background and Relevant Art

Computers and computing systems have affected nearly every aspect of modern living. Computers are generally involved in work, recreation, healthcare, transportation, entertainment, household management, etc.

Modern computing systems have the capability to generate and store large amounts of data. For example, data may be collected by data collection mechanisms coupled to sensors, web services, or other data sources. The raw data can be operated on to create even more data. Mass storage is very inexpensive, so this data can be persisted for long periods of time, without the need to destroy the data to reclaim the storage space. Thus, large amounts of data can be generated and accumulated.

Because of the large amounts of data available, finding a particular piece of data is akin to the proverbial finding of a needle in a haystack. Difficulties can arise simply in searching through the large amounts of data. This can be compounded by a user not being able to craft effective search queries. In particular, various indexes and search engines can organize and make data searchable, but these tools are only as effective as a user performing a search allows them to be by constructing appropriate queries. Further, a user may have a desire to find data that cannot completely be provided by a single data store.

The subject matter claimed herein is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described above. Rather, this background is only provided to illustrate one exemplary technology area where some embodiments described herein may be practiced.

BRIEF SUMMARY

One embodiment illustrated herein is directed to a method that may be practiced in a distributed computing environment. The method includes acts for querying a finite set of data sources. The method includes receiving a query from a user. The method further includes determining a set of two or more data sources from the finite set of data sources that together can be used to satisfy the query. The method further includes translating at least a portion of the query from the user to semantically appropriate queries for the two or more data sources. The method further includes receiving results from the two or more data sources to the semantically appropriate queries. The method further includes aggregating the results, and presenting the aggregation to the user.

This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.

Additional features and advantages will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the teachings herein. Features and advantages of the invention may be realized and obtained by means of the instruments and combinations particularly pointed out in the appended claims. Features of the present invention will become more fully apparent from the following description and appended claims, or may be learned by the practice of the invention as set forth hereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to describe the manner in which the above-recited and other advantages and features can be obtained, a more particular description of the subject matter briefly described above will be rendered by reference to specific embodiments which are illustrated in the appended drawings. Understanding that these drawings depict only typical embodiments and are not therefore to be considered to be limiting in scope, embodiments will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:

FIG. 1 illustrates an engine configured to receive queries in to translate the queries to semantically appropriate queries;

FIG. 2 illustrates a spreadsheet interface including specialized functions configured to handle natural language queries;

FIG. 3 illustrates a chat client configured to connect to a service that can receive natural language queries in chat form and translate the queries to semantically appropriate queries for underlying data stores;

FIG. 4 illustrates an administration dashboard configured to allow an administrator to add, edit, and delete natural language queries.

FIG. 5 illustrates additional details of the administration dashboard illustrating how an administrator can associate semantically appropriate queries with natural language queries;

FIG. 6 illustrates a method of querying a finite set of data sources.

DETAILED DESCRIPTION

Some embodiments described herein allow users to construct natural language queries on top of data that is exposed through a data platform that has a set of data providers from which it can provide data. One such data platform is the Windows Azure® Marketplace available from Microsoft Corporation of Redmond Wash. However, embodiments may be used with other storage that contains structured data. The natural language query can be used as input by the system to form semantically appropriate queries for two or more of the data set providers, which can then be queried using the semantically appropriate queries. The results from the two or more providers can be aggregated and provided to the user as a single unified result.

Referring now to FIG. 1, an example is illustrated. Some embodiments include an engine 102 located in a central location (e.g. in the cloud 104) that hosts a set 106 of query patterns that are coupled to the structured data in the underlying data store(s) 108-1, 108-2 through 108-n. A query 110 that is provided by a user 100 is mapped to the closest structured pattern from the query patterns 106 and the engine 102 then executes two or more of the queries 112-1, 112-2, and 112-m against two or more of the structured data stores 108-1, 108-2 through 108-n (where m and n in each case indicates some number of queries and some other number of data stores respectively such that while only three are specifically shown the ellipsis and variables m and n represent that other numbers of queries and data stores may be implemented). The queries against different data stores can be used together. For example, queries can be chained. Output (e.g. one of more of results 114-1, 114-2 or 114-m) from one or more earlier queries can be used in subsequent queries (e.g. one or more of 112-1 through 112-m). The result of the user query 110 and the selected query pattern queries (two or more of queries 112-1 through 112-m) is a specific value that is then returned as a result 116 to the user 100. This value is the answer to the question that the user 100 asked through the pattern.

The following illustrates an example: the natural language query “Crime rate in Seattle” maps to the pattern “Crime rate in {City}” this is then translated to a set of queries (such as OData queries, SQL queries or queries in another query language) against the structured data repository as appropriate for each given data repository. These queries result in a specific value that represents the crime rate in Seattle. This value is then returned to the user.

Some embodiments may be implemented in a spreadsheet application, such as Excel® available from Microsoft Corporation of Redmond Wash., using a Lookup or similar function. Such an example is illustrated in FIG. 2. FIG. 2 illustrates a user interface 202 of a spreadsheet application. Column B of the spreadsheet interface 202 includes a specialized Lookup command constructed as follows: =DLOOKUP (“Crime rate in” &A5). The DLOOKUP command may have functionality for connection to an engine 102 and an associated set 106 of query patterns (see FIG. 1). A user can key in a city name into cell A5, and the DLOOKUP will return the crime rate for that city. This command is translated by the engine 102 to semantically appropriate queries that can be run against different data stores, such as data stores 108-1 through 108-n. The result can then be returned and displayed in cell B5. FIG. 2 further illustrates at row 8 an example of a stock quote. In this example, cell B5 may have a specialized Lookup command constructed as follows: =DLOOKUP (“Stock quote for” &A8)

Alternatively or additionally, embodiments may be implemented as a bot that can be used in an instant messaging client, such as Microsoft® Communicator. For example, a user may be able to use an instant messaging client to connect to an information service. Referring now to FIG. 3, an example is illustrated. FIG. 3 illustrates a user interface 302 for a messaging client. The user can ask natural language queries, as if the user were chatting with another human user. For example, FIG. 3 illustrates various natural languages queries including “Last high temperature in Seattle”, “Last market price for MSFT”, “Stock quote for MSFT”, and “Crime rate in Seattle”. The messaging client may be connected to a service that has access to the engine 102 and the set 106 of query patterns. Those natural language queries can be translated using the set 106 of query patterns to semantically appropriate queries (such as queries 112-1 through 112-m) for data repositories available to the information service (such as the repositories 108-1 through 108-n). These queries can then be used to obtain data through responses 114-1 through 114-m and to construct an answer to the user's natural language question and conveyed to the user through the response 116 as illustrated in the responses from DataMarket Bot illustrated in the user interface 302 of FIG. 3.

Alternatively or additionally, embodiments may be implemented as service that uses speech, such as a phone or other application. For example, a user can speak a natural language question into a phone or other computing device. That question can be translated to semantically appropriate queries for different data repositories available to the information service. These queries can then be used to obtain data and to construct an answer to the user's natural language question.

Embodiments may be implemented where a portion or all of the patterns can be inferred from the schema of the underlying structured data. Continuing the example, above, if the data exposes a number of columns, where the columns are labeled “Violent Crime”, “Robbery”, “Domestic Crime”, etc. the pattern that the user can input can be structured in a form of “{Column_Name} in {City}” and the {Column_Name} can be one of these column names. This makes the engine smarter by relying on the structured data it operates on. While the preceding example illustrates usage of column names, embodiments are not limited only to column names. Rather, alternative or additional embodiments may include other types of semantics that are being applied.

Patterns can also contain enums, which is a type with a fixed set of constants, for certain often used variations of a phrase. For example, a pattern may include “crime rate {for|in} {City}” where for and in are the elements of the enum and represent common variances in questions seeking the same information.

The user can also provide information about the type of the data that they are looking for or providing. For example, a user may inject hints. For example, a user may hint that they are asking for an answer (or that they are sending information) that should be a number and that they are looking for text as a result. With this, and given the structure of the underlying data, the system will fetch values that make sense in the context.

Embodiments may additionally or alternatively include functionality to allow the user select data and provide information as to the type of data. For example, a user could select one or more of an Excel® workbook, a table in a Word® document, comma separated elements in a textbox, etc. The user could then indicate the type of the data. For example, the user could select a list of cities and provide an indication to the system that these are cities. Additionally or alternatively, the system could also determine the type by looking at the column header of the selected area or even by inspecting the further context of the document. This structured input can be used to match against one or more pattern from the query patterns 106 that the engine 102 understands and provide the user 100 a smart choice of which patterns can be applied. In particular, by the system knowing what information a user has available for making queries, the system can display in a user interface general query patterns that it has available that would fit the data elements that the user can use as input. The user could then select an appropriate query and populate variable elements from the information that they have available.

The following illustrates another example. The user has a set of cities, e.g., Seattle, San Francisco, Las Vegas, etc. The user selects these cities in a user interface and finds an experience where s/he can tell the system that these are cities. After that the system tells the user that there are 3 patterns that he could use with this data to augment his work: (1) Crime rate in City, (2) Current temperature in City, (3) Average income in City. The user chooses one of the choices for their set of cities and this selection is added to the user's query. The system, by knowing what data points a user has available, can prompt the user as to what query they might like to run. Once the user has selected a natural language query, the system can translate the query to semantically appropriate queries 112-1 through 112-m to obtain results 114-1 through 114-m from data stores 108-1 through 108-n which can be consolidated to provide the result 116 to the user 100.

Embodiments may include functionality for allowing an administrator to construct a query patterns such as query patterns 106 illustrated in FIG. 1. FIG. 4 illustrates an administrator dashboard user interface 400 which allows an administrator to manage query patterns. Using the administration dashboard 400, an administrator can add, edit, or delete query patterns. In particular, an administrator can determine what semantically appropriate queries map to what natural language queries. FIG. 5 illustrates a user interface 500 which illustrates an interface allowing an administrator to add a new natural language pattern. The administrator can enter a natural language pattern into a pattern interface 502. The administrator can then enter a number of semantically appropriate queries in the query fields 504. Note that in the example illustrated in FIG. 5, the query patterns entered into the query fields 504 are linked in a fashion that allows for parallel queries to be performed. However, in other embodiments, an administrator can indicate that queries are to be chained. In particular, when defining chained queries, an administrator can indicate that output from an earlier query can be used as input to a subsequent query. Thus, semantically appropriate queries can be chained to construct richer and more meaningful queries.

The following discussion now refers to a number of methods and method acts that may be performed. Although the method acts may be discussed in a certain order or illustrated in a flow chart as occurring in a particular order, no particular ordering is required unless specifically stated, or required because an act is dependent on another act being completed prior to the act being performed.

Referring now to FIG. 6, a method 600 is illustrated. The method 600 may be practiced in a distributed computing environment, and includes acts for querying a finite set of data sources. The method includes receiving a query from a user (act 602). For example, FIG. 1 illustrates and engine 102 in the cloud 104 receiving a query 110 from a user 100. In some embodiments, the method 600 may be practiced where the query received from the user is a natural language query.

The method 600 further includes determining a set of two or more data sources from the finite set of data sources that together can be used to satisfy the query (act 604). For example, the engine 102 can determine two or more structured data stores from the set of data store 108-1 through 108-n. These two or more structured data stores may have information that can satisfy the users query.

In some embodiments, the method 600 may be practiced where determining a set of two or more data sources includes identifying data sources that can be used together. For example, identifying data sources that can be used together may include identifying data sources that can be used together based on at least one of licensing (including, for example, cost to access data in a particular data store), terms of use, data structures of the data sources, compatibility of inputs and outputs, or data set purposes. For example, licensing restrictions or requirements may require that certain fees be paid to access certain data sources or that certain data sources be used together or not be used together. Similarly, terms of use requirements may have similar restrictions on the system. In another example, the manner in which data is organized in various repositories may make that data more suitable for use with other repositories. Thus, those repositories may be used together. For example, some data stores may be more suitable for language translation queries, while other data stores are more suitable for reporting sports scores, weather, or financial information.

In an alternative or additional embodiment, determining a set of two or more data sources may include identifying data sources based on previous user interaction to select data sources. For example, previous user searches may be used to determine appropriate data sources. The previous user interaction may be indicative of the type of data stores or information that a user searches for. Thus, the system may develop preferences for one data store or type of data store over another data store or type of data store.

The method 600 further includes translating at least a portion of the query from the user to semantically appropriate queries for the two or more data sources (act 606). For example, the query 110 may be translated to semantically appropriate queries using the query patterns 106. These semantically appropriate queries can be used to query two or more of the data stores 108-1 through 108-n.

As will be detailed below, querying the data stores could be done in parallel, series, or in other appropriate fashions. For example, illustrating now a serial query scenario, a user 100 could submit a query 110. The query 110 could be matched to a pattern from the set of patterns 106, where the matched pattern is a pattern semantically appropriate for the data store 108-1. A query 112-1, that is semantically appropriate for the data store 108-1 may be generated and run against the data store 108-1 resulting in the result 114-1. This result 114-1 could be used to generate a second query 112-2 which is then run against a different data store 108-2, resulting in a result 114-2. This may be the result 116 returned to the user, or additional queries may be performed in the serial fashion described against different data stores in the set of data stores 108-1 though 108-n until an appropriate result is found.

In a parallel example, the query 110 may be translated to two or more queries, such as queries 112-1 and 112-2 that are semantically appropriate queries to be run against data stores 108-1 and 108-2 respectively. These two queries 112-1 and 112-2 can be run in parallel and their results aggregated to produce the result 116 that is returned to the user 100.

The method 600 further includes receiving results from the two or more data sources to the semantically appropriate queries (act 608). For example, as illustrated in FIG. 1, results 114-1 and 114-2 may be received from as a result of queries 112-1 and 112-2 to the data stores 108-1 and 108-2 respectively.

The method 600 further includes aggregating the results (act 610). For example, as illustrated in FIG. 1, results 114-1 and 114-2 may be aggregated into the result 116. The method 600 further includes presenting the aggregation to the user. For example, the results 116 may be returned to the user.

As illustrated above, the method 600 may be practiced where semantically appropriate queries are run in series and where aggregating comprises using results from one data source for a query for another data source. For example, embodiments are illustrated above where the query 112-2 is formed using the result 114-1 such that the aggregation occurs by using one result to construct a later query.

Alternatively or additionally the method 600 may be practiced where semantically appropriate queries are run in parallel and parallel results are aggregated. For example, queries 112-1 and 112-2 may be run independent of each other, but the results 114-1 and 114-2 may be aggregated once both results are received.

The method 600 may be practiced where aggregating queries comprises aggregating one or more cached queries. For example, one or more of the queries 112-1 through 112-m may be run at some point (either independently or in fulfilling a previous user query 110), and the corresponding result(s) 114-1 through 114-m cached at the engine 102. When a subsequent query 110 is run, the cached result may be used to satisfy the query 110.

The system illustrated herein may be extensible in that while the system is able to access a fixed set of data stores, additional third party data stores can be added to the set of data stores accessible by the system. In particular, various third parties are able to subscribe to data platform services to make their data available through the data platform services. Typically, the data platform services can obtain financial reward either by charging content providers a fee to host a particular data store or by charging users to access data from data stores while possibly passing on a portion of the collected fee back to providers of data in the data stores. Thus, it may be beneficial for data platform service providers and data providers to collaboratively work together to increase the number of data stores available on a data platform.

Embodiments of the method 600 may be practiced where the user query is based on at least one system prompt indicating the types of queries that a user can ask. For example, in the examples illustrated above, embodiments of the system can identify the types of data a user has available. For example, the user may have available a list of cities. The system can identify that the user has an available list of cities in a dataset. The system can then provide hints as to what queries the user may wish to ask, such as “what is the crime rate of a given city” or “what is the temperature in a given city”.

Further, the methods may be practiced by a computer system including one or more processors and computer readable media such as computer memory. In particular, the computer memory may store computer executable instructions that when executed by one or more processors cause various functions to be performed, such as the acts recited in the embodiments.

Embodiments of the present invention may comprise or utilize a special purpose or general-purpose computer including computer hardware, as discussed in greater detail below. Embodiments within the scope of the present invention also include physical and other computer-readable media for carrying or storing computer-executable instructions and/or data structures. Such computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer system. Computer-readable media that store computer-executable instructions are physical storage media. Computer-readable media that carry computer-executable instructions are transmission media. Thus, by way of example, and not limitation, embodiments of the invention can comprise at least two distinctly different kinds of computer-readable media: physical computer readable storage media and transmission computer readable media.

Physical computer readable storage media includes RAM, ROM, EEPROM, CD-ROM or other optical disk storage (such as CDs, DVDs, etc), magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer.

A “network” is defined as one or more data links that enable the transport of electronic data between computer systems and/or modules and/or other electronic devices. When information is transferred or provided over a network or another communications connection (either hardwired, wireless, or a combination of hardwired or wireless) to a computer, the computer properly views the connection as a transmission medium. Transmissions media can include a network and/or data links which can be used to carry or desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer. Combinations of the above are also included within the scope of computer-readable media.

Further, upon reaching various computer system components, program code means in the form of computer-executable instructions or data structures can be transferred automatically from transmission computer readable media to physical computer readable storage media (or vice versa). For example, computer-executable instructions or data structures received over a network or data link can be buffered in RAM within a network interface module (e.g., a “NIC”), and then eventually transferred to computer system RAM and/or to less volatile computer readable physical storage media at a computer system. Thus, computer readable physical storage media can be included in computer system components that also (or even primarily) utilize transmission media.

Computer-executable instructions comprise, for example, instructions and data which cause a general purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions. The computer executable instructions may be, for example, binaries, intermediate format instructions such as assembly language, or even source code. Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the described features or acts described above. Rather, the described features and acts are disclosed as example forms of implementing the claims.

Alternatively, or in addition, the functionally described herein can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc

Those skilled in the art will appreciate that the invention may be practiced in network computing environments with many types of computer system configurations, including, personal computers, desktop computers, laptop computers, message processors, hand-held devices, multi-processor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile telephones, PDAs, pagers, routers, switches, and the like. The invention may also be practiced in distributed system environments where local and remote computer systems, which are linked (either by hardwired data links, wireless data links, or by a combination of hardwired and wireless data links) through a network, both perform tasks. In a distributed system environment, program modules may be located in both local and remote memory storage devices.

The present invention may be embodied in other specific forms without departing from its spirit or characteristics. The described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is, therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope. 

What is claimed is:
 1. In a distributed computing environment, a method of querying a finite set of data sources, the method comprising: receiving a query from a user; determining a set of two or more data sources from the finite set of data sources that together can be used to satisfy the query; translating at least a portion of the query from the user to semantically appropriate queries for the two or more data sources; receiving results from the two or more data sources to the semantically appropriate queries; aggregating the results; and presenting the aggregation to the user.
 2. The method of claim 1, wherein the query received from the user is a natural language query.
 3. The method of claim 1, wherein semantically appropriate queries are run in series and wherein aggregating comprises using results from one data source for a query for another data source.
 4. The method of claim 1, wherein semantically appropriate queries are run in parallel and parallel results are aggregated.
 5. The method of claim 1, further comprising extensibility adding third party data sources to the finite set of data sources.
 6. The method of claim 1, wherein determining a set of two or more data sources comprises identifying data sources that can be used together.
 7. The method of claim 6, wherein identifying data sources that can be used together comprises identifying data sources that can be used together based on at least one of licensing, terms of use, data structure, compatibility of inputs and outputs, or data set purposes.
 8. The method of claim 1, wherein determining a set of two or more data sources comprises identifying data sources based on previous user interaction to select data sources.
 9. The method of claim 1, wherein the user query is based on at least one system prompt indicating the types of queries that a user can ask.
 10. The method of claim 1, wherein aggregating queries comprises aggregating one or more cached queries.
 11. In a distributed computing environment, a system for querying a finite set of data sources, the system comprising: one or more processors; one or more computer readable media coupled to the one or more processors, wherein the one or more computer readable media comprise computer executable instructions that when executed by one or more of the processors causes one or more of the processors to perform the following: receiving a query from a user; determining a set of two or more data sources from the finite set of data sources that together can be used to satisfy the query; translating at least a portion of the query from the user to semantically appropriate queries for the two or more data sources; receiving results from the two or more data sources to the semantically appropriate queries; aggregating the results; and presenting the aggregation to the user.
 12. The system of claim 11, wherein the query received from the user is a natural language query.
 13. The system of claim 11, wherein semantically appropriate queries are run in series and wherein aggregating comprises using results from one data source for a query for another data source.
 14. The system of claim 11, wherein semantically appropriate queries are run in parallel and parallel results are aggregated.
 15. The system of claim 11, wherein determining a set of two or more data sources comprises identifying data sources that can be used together.
 16. The system of claim 16, wherein identifying data sources that can be used together comprises identifying data sources that can be used together based on at least one of licensing, terms of use, data structure, compatibility of inputs and outputs, or data set purposes.
 17. The system of claim 11, wherein determining a set of two or more data sources comprises identifying data sources based on previous user interaction to select data sources.
 18. The system of claim 11, wherein the user query is based on at least one system prompt indicating the types of queries that a user can ask.
 19. The system of claim 11, wherein aggregating queries comprises aggregating one or more cached queries.
 20. In a distributed computing environment, a system for querying a finite set of data sources, the system comprising: a query engine, wherein the query engine comprise a query a set of query patterns that correlates natural language queries to different semantically appropriate queries for different data sources, wherein the query engine is configured to: receive queries from a user; using the set of query patterns translate at least a portion of the queries from the user to semantically appropriate queries for two or more data sources; send the semantically appropriate queries to two or more data sources from the finite set of data sources that together can be used to satisfy the query; receive results from the two or more data sources to the semantically appropriate queries; aggregate the results; and send the aggregation to the user. 